import { API_CONFIG } from "../config/index.js";
import request  from "./index.js"

export const getIngressListHandler = (data) => {
    return request(API_CONFIG.getIngressListApi,data,"get",2000)
}

export const getIngressClassListHandler = (data) => {
    return request(API_CONFIG.getIngressClassList,data,"get",2000)
}

export const deleteIngressHandler = (clusterId,namespace,name) => {
    return request(API_CONFIG.deleteIngressApi, {clusterId,namespace,name}, "post", 2000)
}

export const createIngressHandler = (data) => {
    return request(API_CONFIG.createIngressApi, data, "post", 2000)
}

export const updateIngressHandler = (data) => {
    return request(API_CONFIG.updateIngressApi, data, "post", 2000)
}

export const getIngressDetailHandler = (data) => {
    return request(API_CONFIG.getIngressApi, data, "get", 3000)
}
export const getIngressTopologyHandler = (data) => {
    return request(API_CONFIG.getIngressTopologyApi, data, "get", 3000)
}